package com.future.controller;

import com.future.common.annotation.ControllerMapping;
import com.future.common.annotation.JsonBody;
import com.future.common.annotation.NoNeedLogin;
import com.future.common.base.BaseController;
import com.future.common.utils.IDUtil;
import com.future.dao.JcbgDao;
import com.future.model.Jcbg;
import com.future.requestbean.JcbgAddBean;
import com.jfinal.aop.Inject;

/**
 * 检查报告
 * @author ThinkPad
 *
 */
@ControllerMapping("/jcbg")
public class JcbgController extends BaseController{
	@Inject
	private JcbgDao jcbgDao;
	public void queryJcbg(){
		renderResult("jcbglist", this.jcbgDao.findAll());
	}
	@NoNeedLogin
	public void addJcbg(@JsonBody JcbgAddBean jcbgAddBean){
		Jcbg jcbg  = beanToModel(jcbgAddBean, Jcbg.class);
		jcbg.setXjbgid(IDUtil.getId());
		jcbg.save();
		renderSuccess();
		
	}
}
